package models

type User struct {
	ID        int    `json:"id" gorm:"primary_key;autoIncrement;column:id"`
	Username  string `json:"username" gorm:"type:varchar(100);not null;uniqueIndex;column:username"`
	Password  string `json:"password" gorm:"type:varchar(255);not null;column:password"`
	NickName  string `json:"nickName" gorm:"type:varchar(100);default:'';column:nick_name"`
	Email     string `json:"email" gorm:"type:varchar(100);default:'';column:email"`
	Phone     string `json:"phone" gorm:"type:varchar(20);default:'';column:phone"`
	CreatedAt int64  `json:"createdAt" gorm:"autoCreateTime;column:created_at"`
	UpdatedAt int64  `json:"updatedAt" gorm:"autoUpdateTime;column:updated_at"`
}

type Customers struct {
	ID                   uint64 `json:"id" msg:"ID" gorm:"primary_key;column:id"`                                                                // id主键
	CustomerName         string `json:"customerName" gorm:"type:varchar(100);not null;column:customer_name" msg:"客户名称"`                          // customerName客户名称
	CustomerTel          string `json:"customerTel" gorm:"type:varchar(100);not null;column:customer_tel" validate:"required,phone" msg:"客户手机号"` // customerTel客户手机号
	Sex                  int32  `json:"sex" gorm:"type:int(11);not null;column:sex" msg:"性别"`                                                    // 1男 2女
	Birthday             int64  `json:"birthday" gorm:"type:int(11);column:birthday" msg:"生日"`                                                   // birthday可选生日（传秒级时间戳）
	HeadUrl              string `json:"headUrl" gorm:"type:varchar(100);column:head_url" msg:"头像"`                                               // headUrl可选头像地址（可选）
	Address              string `json:"address" gorm:"type:varchar(100);column:address" msg:"地址"`                                                // address可选地址（没有特定的验证规则）
	OccupationName       string `json:"occupationName" gorm:"type:varchar(100);column:occupation_name" msg:"职业名称"`
	WorkEnvName          string `json:"workEnvName" gorm:"type:varchar(100);column:work_env_name" msg:"工作环境名称"`
	EyeUsageDistanceName string `json:"eyeUsageDistanceName" gorm:"type:varchar(100);column:eye_usage_distance_name" msg:"用眼距离名称"`
}
